//
//  HXKOrderDetailCell.m
//  FactorySale
//
//  Created by 胡小康 on 2020/4/23.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "HXKOrderDetailCell.h"
#import "SYBigImage.h"

@interface HXKOrderDetailCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;// 产品图片
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;// 产品名称
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;// 产品型号
@property (weak, nonatomic) IBOutlet UILabel *numLabel;// 数量
@property (weak, nonatomic) IBOutlet UILabel *unitLabel;// 单位

@end
@implementation HXKOrderDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
+ (instancetype)cellWithTableView:(UITableView *)tableView {
    
    static NSString *ID = @"HXKOrderDetailCell";
    
    HXKOrderDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [NSBundle.mainBundle loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].firstObject;
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
-(void)setModel:(WeiFaHuoDetailPartsListModel *)model
{
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.attributeLogo] placeholderImage:[UIImage imageNamed:@"logo"]];
    SYBigImage * bigI = [[SYBigImage alloc]init];
    [self.iconImageView addGestureRecognizer:bigI];
    self.iconImageView.userInteractionEnabled = YES;
    
    self.nameLabel.text = [NSString stringWithFormat:@"%@",model.name];
    self.typeLabel.text = [NSString stringWithFormat:@"型号:%@",model.parts_name];
    self.numLabel.text = [NSString stringWithFormat:@"%@",model.count];
    self.unitLabel.text = [NSString stringWithFormat:@"%@",model.unit];
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
